package com.kxr.literetrofit.network.translator;

import java.io.IOException;

import okhttp3.ResponseBody;

/**
 * Created by kongxr on 2019/3/19.
 * 自定数据格式转化类 示例
 */
public class FileTranslator<T> implements IDataTranslator<T> {
    private Class aClass;

    public FileTranslator() {
    }

    public FileTranslator(Class aClass) {
        this.aClass = aClass;
    }

    @Override
    public T translate(ResponseBody responseBody) throws IOException{
        // TODO: 2019/3/19 数据转换具体实现
        return (T) (responseBody.bytes());
    }
}
